<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>MAC address swap with two network cards | Matrix207&#39;s Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="1. Problem1.1 When network setting is normal, found that MAC address was swapped.eth0 –&amp;gt; 00:25:90:70:51:f1eth1 –&amp;gt; 00:25:90:70:51:f0
[root@localhost ~]# ip a
1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; m">
<meta property="og:type" content="article">
<meta property="og:title" content="MAC address swap with two network cards">
<meta property="og:url" content="http://yoursite.com/2013/07/19/mac-address-swap-with-two-network-cards/index.html">
<meta property="og:site_name" content="Matrix207's Blog">
<meta property="og:description" content="1. Problem1.1 When network setting is normal, found that MAC address was swapped.eth0 –&amp;gt; 00:25:90:70:51:f1eth1 –&amp;gt; 00:25:90:70:51:f0
[root@localhost ~]# ip a
1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; m">
<meta property="og:updated_time" content="2016-07-17T14:33:54.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="MAC address swap with two network cards">
<meta name="twitter:description" content="1. Problem1.1 When network setting is normal, found that MAC address was swapped.eth0 –&amp;gt; 00:25:90:70:51:f1eth1 –&amp;gt; 00:25:90:70:51:f0
[root@localhost ~]# ip a
1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; m">
  
    <link rel="alternate" href="/atom.xml" title="Matrix207&#39;s Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Matrix207&#39;s Blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="Flux RSS"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Rechercher"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-mac-address-swap-with-two-network-cards" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2013/07/19/mac-address-swap-with-two-network-cards/" class="article-date">
  <time datetime="2013-07-18T16:00:00.000Z" itemprop="datePublished">2013-07-19</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/network/">network</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      MAC address swap with two network cards
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="1-Problem"><a href="#1-Problem" class="headerlink" title="1. Problem"></a>1. Problem</h3><h4 id="1-1-When-network-setting-is-normal-found-that-MAC-address-was-swapped"><a href="#1-1-When-network-setting-is-normal-found-that-MAC-address-was-swapped" class="headerlink" title="1.1 When network setting is normal, found that MAC address was swapped."></a>1.1 When network setting is normal, found that MAC address was swapped.</h4><p>eth0 –&gt; 00:25:90:70:51:f1<br>eth1 –&gt; 00:25:90:70:51:f0</p>
<pre><code>[root@localhost ~]# ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:25:90:70:51:f1 brd ff:ff:ff:ff:ff:ff
    inet 172.16.110.230/24 brd 172.16.110.255 scope global eth0
    inet6 fe80::225:90ff:fe70:51f1/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:25:90:70:51:f0 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::225:90ff:fe70:51f0/64 scope link 
       valid_lft forever preferred_lft forever
</code></pre><h4 id="1-2-But-when-made-a-bind-to-the-two-interface-it-was-correct"><a href="#1-2-But-when-made-a-bind-to-the-two-interface-it-was-correct" class="headerlink" title="1.2 But when made a bind to the two interface, it was correct."></a>1.2 But when made a bind to the two interface, it was correct.</h4><pre><code>[root@localhost ~]# ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
    link/ether 00:25:90:70:51:f0 brd ff:ff:ff:ff:ff:ff
3: eth1: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
    link/ether 00:25:90:70:51:f1 brd ff:ff:ff:ff:ff:ff
4: bond0: &lt;BROADCAST,MULTICAST,MASTER,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP 
    link/ether 00:25:90:70:51:f1 brd ff:ff:ff:ff:ff:ff
    inet 172.16.110.230/24 brd 172.16.110.255 scope global bond0
    inet6 fe80::225:90ff:fe70:51f1/64 scope link 
       valid_lft forever preferred_lft forever
</code></pre><p><strong>What had done when making the bind?</strong></p>
<p>Use command <code>dmesg</code>, we found that if there were words like “udev: renamed XXX to XXX”,<br>the MAC addree was correct matched to the interface. If not it was error.</p>
<p>before changed:</p>
<pre><code>[root@localhost ~]# dmesg | grep &quot;PCI Express&quot;
pciehp: PCI Express Hot Plug Controller Driver version: 0.4
e1000e 0000:00:19.0: eth0: (PCI Express:2.5GT/s:Width x1) 00:25:90:70:51:f1
e1000e 0000:04:00.0: eth1: (PCI Express:2.5GT/s:Width x1) 00:25:90:70:51:f0

[root@localhost ~]# dmesg | grep udev
udev: starting version 147
udev: starting version 147

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=&quot;eth0&quot;
BOOTPROTO=&quot;dhcp&quot;
HWADDR=&quot;00:25:90:70:51:F1&quot;
NM_CONTROLLED=&quot;yes&quot;
ONBOOT=&quot;no&quot;
TYPE=&quot;Ethernet&quot;
UUID=&quot;151c6203-2172-41b1-bd58-9bf03a2731e7&quot;

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=&quot;eth1&quot;
BOOTPROTO=&quot;dhcp&quot;
HWADDR=&quot;00:25:90:70:51:F0&quot;
NM_CONTROLLED=&quot;yes&quot;
ONBOOT=&quot;no&quot;
TYPE=&quot;Ethernet&quot;
UUID=&quot;a677dbc6-144a-455b-bcd3-6d8439560516&quot;

[root@localhost ~]# cat /etc/udev/rules.d/70-persistent-net.rules 
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x10d3 (e1000e) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:25:90:70:51:f0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;

# PCI device 0x8086:0x1502 (e1000e) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:25:90:70:51:f1&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;
</code></pre><p>after changed:</p>
<pre><code>[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=&quot;eth0&quot;
BOOTPROTO=&quot;dhcp&quot;
HWADDR=&quot;00:25:90:70:51:F0&quot;
NM_CONTROLLED=&quot;yes&quot;
ONBOOT=&quot;no&quot;
TYPE=&quot;Ethernet&quot;
UUID=&quot;a677dbc6-144a-455b-bcd3-6d8439560516&quot;
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=&quot;eth1&quot;
BOOTPROTO=&quot;dhcp&quot;
HWADDR=&quot;00:25:90:70:51:F1&quot;
NM_CONTROLLED=&quot;yes&quot;
ONBOOT=&quot;no&quot;
TYPE=&quot;Ethernet&quot;
UUID=&quot;151c6203-2172-41b1-bd58-9bf03a2731e7&quot;
</code></pre><p>then reboot system.</p>
<pre><code>[root@localhost ~]# ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:25:90:70:51:f1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::225:90ff:fe70:51f1/64 scope link 
       valid_lft forever preferred_lft forever
3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:25:90:70:51:f0 brd ff:ff:ff:ff:ff:ff
    inet 172.16.110.230/24 scope global eth0
    inet6 fe80::225:90ff:fe70:51f0/64 scope link 
       valid_lft forever preferred_lft forever

[root@localhost ~]# dmesg | grep udev
udev: starting version 147
udev: starting version 147
udev: renamed network interface eth0 to rename2
udev: renamed network interface eth1 to eth0
udev: renamed network interface rename2 to eth1

[root@localhost ~]# cat /etc/udev/rules.d/70-persistent-net.rules 
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x10d3 (e1000e) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:25:90:70:51:f0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;

# PCI device 0x8086:0x1502 (e1000e) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:25:90:70:51:f1&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;

# PCI device 0x8086:0x1502 (e1000e) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:25:90:70:51:f1&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;

# PCI device 0x8086:0x10d3 (e1000e) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:25:90:70:51:f0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=&quot;eth0&quot;
BOOTPROTO=&quot;dhcp&quot;
HWADDR=&quot;00:25:90:70:51:F0&quot;
NM_CONTROLLED=&quot;yes&quot;
ONBOOT=&quot;no&quot;
TYPE=&quot;Ethernet&quot;
UUID=&quot;a677dbc6-144a-455b-bcd3-6d8439560516&quot;
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=&quot;eth1&quot;
BOOTPROTO=&quot;dhcp&quot;
HWADDR=&quot;00:25:90:70:51:F1&quot;
NM_CONTROLLED=&quot;yes&quot;
ONBOOT=&quot;no&quot;
TYPE=&quot;Ethernet&quot;
UUID=&quot;151c6203-2172-41b1-bd58-9bf03a2731e7&quot;
[root@localhost ~]#
</code></pre><h4 id="1-3-make-a-bind-to-the-network-MAC-is-correct-also"><a href="#1-3-make-a-bind-to-the-network-MAC-is-correct-also" class="headerlink" title="1.3 make a bind to the network, MAC is correct also."></a>1.3 make a bind to the network, MAC is correct also.</h4><pre><code>[root@localhost ~]# ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
    link/ether 00:25:90:70:51:f1 brd ff:ff:ff:ff:ff:ff
3: eth0: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
    link/ether 00:25:90:70:51:f0 brd ff:ff:ff:ff:ff:ff
4: bond0: &lt;BROADCAST,MULTICAST,MASTER,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP 
    link/ether 00:25:90:70:51:f0 brd ff:ff:ff:ff:ff:ff
    inet 172.16.110.230/24 brd 172.16.110.255 scope global bond0
    inet6 fe80::225:90ff:fe70:51f0/64 scope link 
       valid_lft forever preferred_lft forever
[root@localhost ~]# 
</code></pre><p>delete the bind, still ok.</p>
<h4 id="1-4-How-for-group-ip"><a href="#1-4-How-for-group-ip" class="headerlink" title="1.4 How for group ip?"></a>1.4 How for group ip?</h4><p>group set to 172.16.110.233<br>eth0 set to 172.16.110.230<br>eth1 set to 172.16.110.231<br>from below we found the MAC was ok as hoped.</p>
<pre><code>[root@localhost ~]# ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:25:90:70:51:f1 brd ff:ff:ff:ff:ff:ff
    inet 172.16.110.231/24 scope global eth1
    inet 172.16.110.233/24 scope global secondary eth1
    inet6 fe80::225:90ff:fe70:51f1/64 scope link 
       valid_lft forever preferred_lft forever
3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:25:90:70:51:f0 brd ff:ff:ff:ff:ff:ff
    inet 172.16.110.230/24 scope global eth0
    inet 172.16.110.233/24 scope global secondary eth0
    inet6 fe80::225:90ff:fe70:51f0/64 scope link 
       valid_lft forever preferred_lft forever
</code></pre><h3 id="2-The-steps-to-modify-MAC-of-eth-look-like-as-below"><a href="#2-The-steps-to-modify-MAC-of-eth-look-like-as-below" class="headerlink" title="2. The steps to modify MAC of eth* look like as below"></a>2. The steps to modify MAC of eth* look like as below</h3><ol>
<li>OS boot </li>
<li>udev start </li>
<li>e1000e start, get eth* and MAC </li>
<li>check /etc/sysconfig/network-scripts/ifcfg-XXX, call shell script<br>/lib/udev/write_net_rules to generate rule file to /etc/udev/rules.d/70-persistent-net.rules<br>if MAC was not match with what got from e1000e (view udev source, you wil find udev)</li>
<li>udev rename eth* if there have “add” action in rule file /etc/udev/rules.d/70-persistent-net.rules</li>
</ol>
<h4 id="2-1-Check-lib-udev-write-net-rules"><a href="#2-1-Check-lib-udev-write-net-rules" class="headerlink" title="2.1 Check /lib/udev/write_net_rules"></a>2.1 Check /lib/udev/write_net_rules</h4><pre><code>36 RULES_FILE=&apos;/etc/udev/rules.d/70-persistent-net.rules&apos;
37 
38 . /lib/udev/rule_generator.functions
39 
40 find_all_ifcfg() {
41     local links=$1
42     local __sed_discard_ignored_files=&apos;/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d&apos;
43 
44     files=$(echo /etc/sysconfig/network-scripts/ifcfg-* \
45         | LC_ALL=C sed -e &quot;$__sed_discard_ignored_files&quot;)
46     for i in $files; do
47         (
48             . $i
49             [ -n &quot;$HWADDR&quot; ] &amp;&amp; [ &quot;${links%%[ \[\]0-9]*}&quot; = &quot;${DEVICE%%[ \[\]0-9]*}&quot; ] &amp;&amp; echo $DEVICE
50         )
51     done
52 }

70 write_rule() {
71         local match=&quot;$1&quot;
72         local name=&quot;$2&quot;
73         local comment=&quot;$3&quot;
74 
75         {
76         if [ &quot;$PRINT_HEADER&quot; ]; then
77                 PRINT_HEADER=
78                 echo &quot;# This file was automatically generated by the $0&quot;
79                 echo &quot;# program, run by the persistent-net-generator.rules rules file.&quot;
80                 echo &quot;#&quot;
81                 echo &quot;# You can modify it, as long as you keep each rule on a single&quot;
82                 echo &quot;# line, and change only the value of the NAME= key.&quot;
83         fi
84 
85         echo &quot;&quot;
86         [ &quot;$comment&quot; ] &amp;&amp; echo &quot;# $comment&quot;
87         echo &quot;SUBSYSTEM==\&quot;net\&quot;, ACTION==\&quot;add\&quot;$match, NAME=\&quot;$name\&quot;&quot;
88         } &gt;&gt; $RULES_FILE
89 }

153 write_rule &quot;$match&quot; &quot;$INTERFACE&quot; &quot;$COMMENT&quot;
</code></pre><h4 id="2-1-Check-udev-source"><a href="#2-1-Check-udev-source" class="headerlink" title="2.1 Check udev source"></a>2.1 Check udev source</h4><p>search the string we found in dmesg:</p>
<pre><code>[dennis@localhost udev]$ pwd
/home/dennis/Downloads/udev-174/udev
[dennis@localhost udev]$ grep -r -i --include &quot;*.c&quot; &quot;renamed&quot; .
./udev-rules.c:    /* handle device, renamed by external tool, returning new path */
./udev-event.c:    fprintf(f, &quot;&lt;30&gt;udevd[%u]: renamed network interface %s to %s\n&quot;,
./udev-event.c:                info(event-&gt;udev, &quot;renamed netif to &apos;%s&apos;\n&quot;, event-&gt;name);
[dennis@localhost udev]$ gvim udev-event.c 

static void rename_netif_kernel_log(struct ifreq ifr)
{
    int klog;
    FILE *f;

    klog = open(&quot;/dev/kmsg&quot;, O_WRONLY);
    if (klog &lt; 0)
        return;

    f = fdopen(klog, &quot;w&quot;);
    if (f == NULL) {
        close(klog);
        return;
    }

    fprintf(f, &quot;&lt;30&gt;udevd[%u]: renamed network interface %s to %s\n&quot;,
        getpid(), ifr.ifr_name, ifr.ifr_newname);
    fclose(f);
}
</code></pre><p>Because udev write log to /dev/kmsg, so we can got output like below:</p>
<pre><code>[root@localhost ~]# dmesg | grep udev
udev: starting version 147
udev: starting version 147
udev: renamed network interface eth0 to rename2
udev: renamed network interface eth1 to eth0
udev: renamed network interface rename2 to eth1
</code></pre><p>Continue tracking, found that <code>rename_netif_kernel_log</code> was called only by function: </p>
<pre><code>static int rename_netif(struct udev_event *event)
</code></pre><p>And who call <code>rename_netif</code>, the answer is only function: </p>
<pre><code>int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask)
</code></pre><p>From code segment from this function, we see:</p>
<pre><code>....
/* rename a new network interface, if needed */
if (udev_device_get_ifindex(dev) &gt; 0 &amp;&amp; strcmp(udev_device_get_action(dev), &quot;add&quot;) == 0 &amp;&amp;
    event-&gt;name != NULL &amp;&amp; strcmp(event-&gt;name, udev_device_get_sysname(dev)) != 0) {
    char syspath[UTIL_PATH_SIZE];
    char *pos;

    err = rename_netif(event);
....
</code></pre><p>from the name of function <code>udev_event_execute_rules</code> and cod segment, we can say,<br>udev rename ethXXX by the rules, where should have action like as “add”.</p>
<h4 id="2-2-Check-e1000e-source-found-nothing"><a href="#2-2-Check-e1000e-source-found-nothing" class="headerlink" title="2.2 Check e1000e source, found nothing"></a>2.2 Check e1000e source, found nothing</h4><h4 id="2-3-Check-dmesg-source-found-nothing"><a href="#2-3-Check-dmesg-source-found-nothing" class="headerlink" title="2.3 Check dmesg source, found nothing"></a>2.3 Check dmesg source, found nothing</h4><h4 id="2-4-Check-system-config-network-source-found-nothing"><a href="#2-4-Check-system-config-network-source-found-nothing" class="headerlink" title="2.4 Check system-config-network source, found nothing"></a>2.4 Check system-config-network source, found nothing</h4><h3 id="3-How-to-fix"><a href="#3-How-to-fix" class="headerlink" title="3. How to fix"></a>3. How to fix</h3><p>Use this shell scripts to check MAC</p>
<pre><code>#!/bin/sh

# check MAC address, if not match the correct interface, fix it.
file_eth0=/etc/sysconfig/network-scripts/ifcfg-eth0
file_eth1=/etc/sysconfig/network-scripts/ifcfg-eth1

if [ -e $file_eth0 ] &amp;&amp; [ -e $file_eth1 ]; then 
    # get MAC and UUID
    MAC0=$(grep HWADDR $file_eth0 | awk -F&apos;&quot;&apos; &apos;{print $(NF-1)}&apos;)
    MAC1=$(grep HWADDR $file_eth1 | awk -F&apos;&quot;&apos; &apos;{print $(NF-1)}&apos;)
    UUID0=$(grep UUID  $file_eth0 | awk -F&apos;&quot;&apos; &apos;{print $(NF-1)}&apos;)
    UUID1=$(grep UUID  $file_eth1 | awk -F&apos;&quot;&apos; &apos;{print $(NF-1)}&apos;)

    if [ &quot;$MAC0&quot; != &quot;&quot; ] &amp;&amp; [ &quot;$MAC1&quot; != &quot;&quot; ]; then
        # compare MAC
        compare_flag=0
        compare_flag=`echo $MAC0 $MAC1 | awk &apos;$1&gt;$2 {print 1}&apos;`
        if [ &quot;$compare_flag&quot; == &quot;1&quot; ]; then
            # swap MAC and UUID
            sed -i &apos;s/&apos;$MAC0&apos;/&apos;$MAC1&apos;/g&apos; $file_eth0
            sed -i &apos;s/&apos;$MAC1&apos;/&apos;$MAC0&apos;/g&apos; $file_eth1
            if [ &quot;$UUID0&quot; != &quot;&quot; ] &amp;&amp; [ &quot;$UUID1&quot; != &quot;&quot; ]; then
                sed -i &apos;s/&apos;$UUID0&apos;/&apos;$UUID1&apos;/g&apos; $file_eth0
                sed -i &apos;s/&apos;$UUID1&apos;/&apos;$UUID0&apos;/g&apos; $file_eth1
            else
                sed -i &apos;/UUID/d&apos; $file_eth0
                [ &quot;$UUID1&quot; != &quot;&quot; ] &amp;&amp; echo &quot;UUID=\&quot;$UUID1\&quot;&quot; &gt;&gt; $file_eth0
                sed -i &apos;/UUID/d&apos; $file_eth1
                [ &quot;$UUID0&quot; != &quot;&quot; ] &amp;&amp; echo &quot;UUID=\&quot;$UUID0\&quot;&quot; &gt;&gt; $file_eth1
            fi
        fi
    fi
fi
</code></pre><h3 id="4-Question"><a href="#4-Question" class="headerlink" title="4. Question"></a>4. Question</h3><ol>
<li>/etc/sysconfig/network-scripts/ifcfg-XXX were generated by who? system-config-network?</li>
</ol>
<h3 id="5-Reference"><a href="#5-Reference" class="headerlink" title="5. Reference"></a>5. Reference</h3><ul>
<li><a href="http://www.linuxfromscratch.org/lfs/view/development/chapter07/network.html" target="_blank" rel="external">7.2. General Network Configuration</a></li>
<li><a href="http://muzso.hu/2012/10/29/how-to-regenerate-the-etc-udev-rules.d-70-persistent-net.rules-file-on-debian-ubuntu" target="_blank" rel="external">How to regenerate the /etc/udev/rules.d/70-persistent-net.rules file on Debian/Ubuntu</a></li>
<li><a href="http://blog.csdn.net/gangban_lau/article/details/7209123" target="_blank" rel="external">udev is renaming my ethernet devices</a></li>
<li><a href="http://www.centos.org/docs/4/html/rhel-rg-en-4/s1-networkscripts-interfaces.html" target="_blank" rel="external">Red Hat Enterprise Linux 4: Reference Guide</a></li>
<li><a href="http://fedora.12.x6.nabble.com/Generating-ifcfg-eth0-from-scratch-td2280845.html" target="_blank" rel="external">Generating ifcfg-eth0 from scratch</a></li>
<li><a href="https://lists.fedoraproject.org/pipermail/users/2011-May/396591.html" target="_blank" rel="external">Generating ifcfg-eth0 from scratch</a></li>
<li><a href="http://brennan.id.au/04-Network_Configuration.html" target="_blank" rel="external">Chapter 4 - Network Configuration</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2013/07/19/mac-address-swap-with-two-network-cards/" data-id="ciqqpe1kz005snmpvyvbgknp4" class="article-share-link">Partager</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/network/">network</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2013/07/29/networkstack-internet-protocol-suite/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Récent</strong>
      <div class="article-nav-title">
        
          NetworkStack Internet protocol suite
        
      </div>
    </a>
  
  
    <a href="/2013/07/16/steven-jobs-stanford-commencement-address-june-2005/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Ancien</strong>
      <div class="article-nav-title">Steven Jobs: Stanford commencement address, June 2005</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Catégories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/blog/">blog</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/database/">database</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/english/">english</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/kernel/">kernel</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/language/">language</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/linux/">linux</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/math/">math</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/network/">network</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/others/">others</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/person/">person</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/program/">program</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/source/">source</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/storage/">storage</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/tools/">tools</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/windows/">windows</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Mot-clés</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/FAQ/">FAQ</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/IRC/">IRC</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Translation/">Translation</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/android/">android</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/api/">api</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/assembly/">assembly</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/awk/">awk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/batch/">batch</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/blog/">blog</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/book/">book</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/c/">c++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cache/">cache</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/crash/">crash</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/database/">database</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/debug/">debug</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/dot/">dot</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/driver/">driver</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/emacs/">emacs</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/exploit/">exploit</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/file-system/">file system</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/filesystem/">filesystem</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/flowchart/">flowchart</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gcc/">gcc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/google/">google</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/graphviz/">graphviz</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hosts/">hosts</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/iscsi/">iscsi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/javascript/">javascript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/job/">job</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/json/">json</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kernel/">kernel</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lisp/">lisp</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/lua/">lua</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/makefile/">makefile</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/malloc/">malloc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/math/">math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/maxima/">maxima</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory/">memory</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memory-overflow/">memory overflow</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mtrace/">mtrace</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/netdisk/">netdisk</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/network/">network</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/others/">others</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/pandoc/">pandoc</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/performance/">performance</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/person/">person</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/">protobuf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rsync/">rsync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sed/">sed</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/shell/">shell</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/skype/">skype</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sms/">sms</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/source/">source</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ssh/">ssh</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/stack/">stack</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/storage/">storage</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/study/">study</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/svn/">svn</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sync/">sync</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/time/">time</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/tools/">tools</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/valgrind/">valgrind</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vi/">vi</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/virtual/">virtual</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wget/">wget</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/windows/">windows</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wireshark/">wireshark</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/write/">write</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/xml/">xml</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Nuage de mot-clés</h3>
    <div class="widget tagcloud">
      <a href="/tags/FAQ/" style="font-size: 10px;">FAQ</a> <a href="/tags/IRC/" style="font-size: 10px;">IRC</a> <a href="/tags/Translation/" style="font-size: 13px;">Translation</a> <a href="/tags/android/" style="font-size: 10px;">android</a> <a href="/tags/api/" style="font-size: 10px;">api</a> <a href="/tags/assembly/" style="font-size: 10px;">assembly</a> <a href="/tags/awk/" style="font-size: 11px;">awk</a> <a href="/tags/batch/" style="font-size: 14px;">batch</a> <a href="/tags/blog/" style="font-size: 10px;">blog</a> <a href="/tags/book/" style="font-size: 10px;">book</a> <a href="/tags/c/" style="font-size: 16px;">c</a> <a href="/tags/c/" style="font-size: 19px;">c++</a> <a href="/tags/cache/" style="font-size: 10px;">cache</a> <a href="/tags/crash/" style="font-size: 10px;">crash</a> <a href="/tags/database/" style="font-size: 17px;">database</a> <a href="/tags/debug/" style="font-size: 12px;">debug</a> <a href="/tags/dot/" style="font-size: 10px;">dot</a> <a href="/tags/driver/" style="font-size: 10px;">driver</a> <a href="/tags/emacs/" style="font-size: 11px;">emacs</a> <a href="/tags/exploit/" style="font-size: 10px;">exploit</a> <a href="/tags/file-system/" style="font-size: 10px;">file system</a> <a href="/tags/filesystem/" style="font-size: 12px;">filesystem</a> <a href="/tags/flowchart/" style="font-size: 10px;">flowchart</a> <a href="/tags/gcc/" style="font-size: 10px;">gcc</a> <a href="/tags/git/" style="font-size: 12px;">git</a> <a href="/tags/google/" style="font-size: 11px;">google</a> <a href="/tags/graphviz/" style="font-size: 11px;">graphviz</a> <a href="/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/tags/hosts/" style="font-size: 10px;">hosts</a> <a href="/tags/iscsi/" style="font-size: 14px;">iscsi</a> <a href="/tags/java/" style="font-size: 10px;">java</a> <a href="/tags/javascript/" style="font-size: 10px;">javascript</a> <a href="/tags/job/" style="font-size: 10px;">job</a> <a href="/tags/json/" style="font-size: 10px;">json</a> <a href="/tags/kernel/" style="font-size: 14px;">kernel</a> <a href="/tags/linux/" style="font-size: 14px;">linux</a> <a href="/tags/lisp/" style="font-size: 10px;">lisp</a> <a href="/tags/lua/" style="font-size: 10px;">lua</a> <a href="/tags/makefile/" style="font-size: 10px;">makefile</a> <a href="/tags/malloc/" style="font-size: 10px;">malloc</a> <a href="/tags/math/" style="font-size: 11px;">math</a> <a href="/tags/maxima/" style="font-size: 10px;">maxima</a> <a href="/tags/memory/" style="font-size: 11px;">memory</a> <a href="/tags/memory-overflow/" style="font-size: 10px;">memory overflow</a> <a href="/tags/mtrace/" style="font-size: 10px;">mtrace</a> <a href="/tags/netdisk/" style="font-size: 10px;">netdisk</a> <a href="/tags/network/" style="font-size: 20px;">network</a> <a href="/tags/others/" style="font-size: 18px;">others</a> <a href="/tags/pandoc/" style="font-size: 10px;">pandoc</a> <a href="/tags/performance/" style="font-size: 16px;">performance</a> <a href="/tags/person/" style="font-size: 11px;">person</a> <a href="/tags/protobuf/" style="font-size: 11px;">protobuf</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/rsync/" style="font-size: 10px;">rsync</a> <a href="/tags/sed/" style="font-size: 11px;">sed</a> <a href="/tags/shell/" style="font-size: 15px;">shell</a> <a href="/tags/skype/" style="font-size: 11px;">skype</a> <a href="/tags/sms/" style="font-size: 10px;">sms</a> <a href="/tags/source/" style="font-size: 11px;">source</a> <a href="/tags/ssh/" style="font-size: 10px;">ssh</a> <a href="/tags/stack/" style="font-size: 10px;">stack</a> <a href="/tags/storage/" style="font-size: 15px;">storage</a> <a href="/tags/study/" style="font-size: 10px;">study</a> <a href="/tags/svn/" style="font-size: 11px;">svn</a> <a href="/tags/sync/" style="font-size: 10px;">sync</a> <a href="/tags/test/" style="font-size: 11px;">test</a> <a href="/tags/time/" style="font-size: 10px;">time</a> <a href="/tags/tools/" style="font-size: 16px;">tools</a> <a href="/tags/valgrind/" style="font-size: 10px;">valgrind</a> <a href="/tags/vi/" style="font-size: 10px;">vi</a> <a href="/tags/vim/" style="font-size: 14px;">vim</a> <a href="/tags/virtual/" style="font-size: 11px;">virtual</a> <a href="/tags/wget/" style="font-size: 10px;">wget</a> <a href="/tags/windows/" style="font-size: 11px;">windows</a> <a href="/tags/wireshark/" style="font-size: 10px;">wireshark</a> <a href="/tags/write/" style="font-size: 13px;">write</a> <a href="/tags/xml/" style="font-size: 10px;">xml</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">July 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">April 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">March 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">February 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">October 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">September 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">August 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/07/">July 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">June 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/03/">March 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/02/">February 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/01/">January 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/12/">December 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/11/">November 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/09/">September 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/08/">August 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/07/">July 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/06/">June 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/05/">May 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/04/">April 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/03/">March 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/11/">November 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/10/">October 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/09/">September 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/08/">August 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/07/">July 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/06/">June 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/05/">May 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/04/">April 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/03/">March 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/02/">February 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/01/">January 2013</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/12/">December 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/09/">September 2012</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Articles récents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/07/17/how-to-implement-malloc/">如何实现一个malloc</a>
          </li>
        
          <li>
            <a href="/2016/07/17/study-grep-more/">grep工作原理</a>
          </li>
        
          <li>
            <a href="/2016/07/17/2016-04-13-malloc/">malloc</a>
          </li>
        
          <li>
            <a href="/2016/04/27/include-what-you-use/">使用IWYU整理头文件引用</a>
          </li>
        
          <li>
            <a href="/2016/04/24/understand-gcc-assembly-output/">understand gcc assembly output</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2016 Matrix207<br>
      Propulsé by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>